import axiosData from '@/api/axios';

export default {
  // 分页查询设备列表
  queryPageByCondition(params) {
    return axiosData.post('/v3/40089-process-v2/equipment/queryPageByCondition', params);
  },
  // 新增设备
  addEquipment(params) {
    return axiosData.post('/v3/40089-process-v2/equipment/add', params);
  },
  // 设备信息修改
  editEquipment(params) {
    return axiosData.post('/v3/40089-process-v2/equipment/edit', params);
  },
  // 删除设备
  delEquipment(equipmentId) {
    return axiosData.get(`/v3/40089-process-v2/equipment/delById?equipmentId=${equipmentId}`);
  },
  // 批量导入设备
  importEquipment(paylod) {
    return axiosData.post(`/v3/40089-process-v2/equipment/importList`, paylod);
  },
  // 上传设备文件
  addEquipmentFile(paylod) {
    return axiosData.post(`/v3/40089-process-v2/equipmentFile/add`, paylod);
  },
  // 删除设备文件
  delEquipmentFile(equipmentFileId) {
    return axiosData.get(`/v3/40089-process-v2/equipmentFile/delById?equipmentFileId=${equipmentFileId}`);
  },
  // 根据设备编号获取图片
  getPictureByEquipmentCode(equipmentCode) {
    return axiosData.get(`/v3/40089-process-v2/equipmentFile/getPictureByEquipmentCode?equipmentCode=${equipmentCode}`);
  },
  // 根据设备编号获取视频
  getVideoByEquipmentCode(equipmentCode) {
    return axiosData.get(`/v3/40089-process-v2/equipmentFile/getVideoByEquipmentCode?equipmentCode=${equipmentCode}`);
  },
  // 根据设备编号获取文件
  getFileByEquipmentCode(equipmentCode) {
    return axiosData.get(`/v3/40089-process-v2/equipmentFile/getFileByEquipmentCode?equipmentCode=${equipmentCode}`);
  },
  // 删除设备
  delEquipments(paylod) {
    return axiosData.post(`/v3/40089-process-v2/equipment/delListByIdList`, paylod);
  },
  // 根据设备id查询
  queryById(equipmentId) {
    return axiosData.get(`/v3/40089-process-v2/equipment/queryById?equipmentId=${equipmentId}`);
  }
};
